Simulation-based mastery learning